import request from '/@/utils/request';

export function getDeptAll() {
    return request({
        url: '/v1/admin/dept/all',
        method: 'get',
    })
}

export function getDeptList(query?:Object) {
    return request({
        url: '/v1/admin/dept/list',
        method: 'get',
        params:query
    })
}

export function getDeptInfo(id:number) {
    return request({
        url: '/v1/admin/dept/info',
        method: 'get',
        params:{id},
    })
}


export function saveDept(data:object) {
    return request({
        url: '/v1/admin/dept/save',
        method: 'post',
        data:data
    })
}


export function deleteDept(id:number) {
    return request({
        url: '/v1/admin/dept/delete',
        method: 'delete',
        data:{id}
    })
}
